class Solution {
    public:
        vector<int> rowAndMaximumOnes(vector<vector<int>>& mat) {
            int n = mat.size(), m = mat[0].size();
            vector<int>cnt(n);
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    cnt[i] += mat[i][j];
                }
            }
            int pos = 0;
            for (int i = 1; i < n; i++) {
                if(cnt[i] > cnt[pos]){
                    pos = i;
                }   
            }
            return {pos,cnt[pos]};
        }
    };